<?php

namespace haibao\cms\business\control\wap\common;

class ReturnTopController extends \haibao\cms\business\control\Base{
	
	const FROM_WHERE_CHANNEL = 1;
	const FROM_WHERE_INFO = 2;
	
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	
	/**
	 * 获取模版内容
	 * @param : String $content
	 */
	public function displayTemplateHtml(){
		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$fromWhere = self::FROM_WHERE_CHANNEL;
		if($controlData['manual']){
			if(isset($controlData['manual']['fromWhere'])){
				$fromWhere = $controlData['manual']['fromWhere'];
			}
		}
		$path = $this->generateHtmlPath(__CLASS__);
		$this->assign('fromWhere',$fromWhere);
		$this->generateHtml($path,$content);
		return $this->getHtml($path);
	}
}